package com.spring.ext.demos.ext.event;

import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

/**
 * 根据注解进行事件监听
 */
@Component
public class MyApplicationListener2 {
    @EventListener(MyEvent.class)
    public void onApplicationEvent(MyEvent event){

    }
}
